package Example15;
class Animal{
    public void shout(){
        System.out.println("叽喳~叽喳~叽喳");
    }
}
class Dog extends Animal{
    public void eat(){
        System.out.println("咩~咩~咩");
    }
    public void ea(){
        System.out.println("吃一双蚂蚁");
    }
}
public class Exa15 {
    public static void main(String[] args){
        Dog dog = new Dog();
        Animal a1=dog;
        a1.shout();
        // a1.eat(); Animal没有eat方法 所以eat无法使用
    }
}
